package com.xkl.springdoc.request;

import com.xkl.springdoc.validate.AddGroup;
import com.xkl.springdoc.validate.EditGroup;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单DTO
 *
 * @version: 1.0.0-SNAPSHOT
 * @author: 码农小卡拉
 * @createTime: 2025-09-18 13:58
 **/
@Data
public class SaleListDTO implements Serializable {
    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private Long id;
    /**
     * 订单编码
     */
    private String orderNo;
    /**
     * 订单金额
     */
    @NotNull(message = "订单金额不能为空", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal orderAmount;
    /**
     * 商品单价
     */
    private BigDecimal price;
    /**
     * 商品数量
     */
    @NotNull(message = "订单金额不能为空", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal goodsCount;
    /**
     * 购买人ID
     */
    @NotNull(message = "购买人ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long userId;

}
